package item;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class sqliteConnection extends SQLiteOpenHelper {
    public sqliteConnection(Context context){
        super(context,"maillist2.db",null,2);
        System.out.println("database");
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        System.out.println("oncreate");
        db.execSQL("create table mail(_id integer primary key autoincrement," +
                "name varchar(10),number varchar(20),grade varchar(10)," +
                "email varchar(20),gender varchar(2))");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        System.out.println("onupgrade");
    }
}
